class Entity
  attr_accessor :x, :y, :velx, :vely

  def initialize(x, y, velx, vely)
    @x = x
    @y = y
    @velx = velx
    @vely = vely
  end

public
  def move_left
    @x -= velx
  end

  def move_right
    @x += velx
  end

  def move_up
    @y -= vely
  end

  def move_down
    @y += vely
  end
end
